from flask import request
from . import carbon_trade_bp
from controller.trade.get_trade_info import GetTradeInfo
from controller.users_controller import UserAuth
check_token = UserAuth.login_verify


@carbon_trade_bp.route('/get_vips', methods=['POST'])
def get_vips():
    return GetTradeInfo.get_vips(request)


@carbon_trade_bp.route('/get_file', methods=['POST'])
def get_file():
    return GetTradeInfo.get_file(request)


@carbon_trade_bp.route('/purchase_vip', methods=['POST'])
@check_token
def purchase_vip():
    return GetTradeInfo.purchase_vip(request)


@carbon_trade_bp.route('/purchase_file', methods=['POST'])
@check_token
def purchase_file():
    return GetTradeInfo.purchase_file(request)


@carbon_trade_bp.route('/query', methods=['POST'])
def query():
    return GetTradeInfo.query(request)


@carbon_trade_bp.route('/get_orders', methods=['POST'])
@check_token
def get_orders():
    return GetTradeInfo.get_orders(request)


